Image processing method and apparatus

ABSTRACT

Upon outputting halftone image data to an output device, density transformation is prevalently done to improve image quality. Density transformation corresponds to linear gamma correction, and cannot correct any color fog and the like of a photo image. Hence, lightness/color difference information of halftone image data is acquired on the basis of low-frequency components of frequency data obtained by transforming halftone image data into spatial frequency components, and a lightness/color difference transform amount of the halftone image data is set on the basis of the acquired lightness/color difference information.

FIELD OF THE INVENTION

The present invention relates to an image processing apparatus andmethod and, more particularly, to an image process for acquiringlightness information and color difference information of grayscaleimage data which is transformed into frequency data by, e.g., discretecosine transformation, and setting lightness and color-differencetransformation amounts of the grayscale image data.

BACKGROUND OF THE INVENTION

Upon outputting grayscale image data to an output device, densitytransformation is popularly done to improve image quality. For example,JP 3,163,753 (B2) discloses a technique for quickly inspecting thedensity distribution by inspecting that of low-frequency components infrequency data obtained by transforming grayscale image data intospatial frequency components, and transforming the density on the basisof the inspection result.

According to the above technique, the density of an image can betransformed. However, density transformation corresponds to linear gammacorrection, and cannot correct color fog and the like of a photo image.

A photo-direct printer as a non-PC device normally has a RAM size ofseveral Mbytes in terms of cost limitations and the like, and itsstorage capacity is as small as around 1/16 to 1/64 of those of recentPCs. The photo-direct printer must often store a program, and dataassociated with control of the printer and interface in a single RAM,thus imposing severer memory limitations. In recent years, since thenumber of pixels of a digital camera increases, the data size per photoincreases, and some data exceed 1 MB per photo.

In consideration of the above circumstances, when a work memory has aninsufficient storage capacity, access to an external storage device(e.g., a memory card) occurs frequently, resulting in a considerabledrop of the processing speed.

SUMMARY OF THE INVENTION

The present invention has been made to solve the aforementioned problemsindividually or simultaneously, and has as its object to quickly setlightness and color difference transformation amounts used to correctcolor fog, contrast, saturation, and the like of an image.

In order to achieve the above object, a preferred embodiment of thepresent invention discloses an image processing apparatus comprising: anobtaining section, arranged to acquire lightness and color-differenceinformation of halftone image data on the basis of low-frequencycomponents of frequency data obtained by transforming the halftone imagedata into spatial frequency components; and a setter, arranged to set alightness and color-difference transform amount of the halftone imagedata on the basis of the acquired lightness and color-differenceinformation.

It is another object of the present invention to set quickly andaccurately set lightness and color difference transformation amountsused to correct color fog, contrast, saturation, and the like of animage.

In order to achieve the above object, a preferred embodiment of thepresent invention discloses an image processing apparatus comprising: anextractor, arranged to extract a feature amount of frequency dataobtained by transforming halftone image data into spatial frequencycomponents; a determiner, arranged to determine an acquisition method oflightness and color-difference information of the halftone image data onthe basis of the extracted feature amount; an obtaining section,arranged to acquire lightness and color-difference information of thehalftone image data from the frequency data in accordance with thedetermination result; and a setter, arranged to set a lightness andcolor-difference transform amount of the halftone image data on thebasis of the acquired lightness and color-difference information.

Other features and advantages of the present invention will be apparentfrom the following description taken in conjunction with theaccompanying drawings, in which like reference characters designate thesame or similar parts throughout the figures thereof.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a view for explaining DCT and IDCT;

FIG. 2 is a flow chart showing the process of encoded image data;

FIG. 3 is a flow chart showing the accumulation/count process oflightness and color-difference signals;

FIGS. 4A to 7B are views for explaining correction of color balance;

FIG. 8 is a flow chart showing the process of the second embodiment;

FIG. 9 is a flow chart showing the process of the third embodiment;

FIG. 10 is a flow chart showing the process of the fourth embodiment;

FIG. 11 is a flow chart showing the process of the fifth embodiment;

FIGS. 12A to 12C are views for explaining accumulation processesaccording to classes of feature amounts;

FIG. 13 is a flow chart showing the process of the sixth embodiment;

FIG. 14 is a schematic perspective view of a printer;

FIG. 15 is a schematic perspective view showing an example of thestructure of a print head;

FIG. 16 is a schematic view of a control panel;

FIG. 17 is a block diagram showing the arrangement of principal partassociated with printer control;

FIG. 18 is a block diagram showing an example of the arrangement ofASIC; and

FIG. 19 is a block diagram showing the functional arrangement associatedwith a printer interface and image process.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

An image process according to preferred embodiments of the presentinvention will be described in detail hereinafter with reference to theaccompanying drawings.

[Coding Principle of Image Data]

The coding principle of image data based on orthogonal transformationwill be briefly explained first.

Transformation coding based on orthogonal transformation removescorrelation among sample values by transforming sample values intocoordinate system values which are orthogonal to each other, thusimplementing efficient coding. Image data is transformed into frequencycomponents, and quantization is done by assigning many code bits tolow-frequency components where power is concentrated and the influenceis large in terms of visual characteristics, and assigning fewer codebits to high-frequency components, thus improving the compression ratioof data. As orthogonal transformation for transforming image data intofrequency components, Hadamard transformation, discrete cosinetransformation (DCT), and the like are known.

DCT and its inverse transformation (to be referred to as “IDCT”hereinafter) will be described below with reference to FIG. 1 taking asan example a case wherein coding is done to have 8×8 pixels as oneblock.

Original image data 901 is broken up into blocks 902 each having 8×8pixels, and transformation is made for respective blocks. As for pixelpositions depending on their relative positions in a block, an upperleft pixel is defined as 0th data as the origin, and pixel data at thei-th position in the right direction and the j-th position in the downdirection is defined by:

f(i,j)

for 0≦i<8, 0≦j<8

where i and j are integers.

Therefore, origin data at the upper left corner of a block 903 is f(0,0), and data at the lower right corner is f(7, 7). Data F(u, v) (0≦u<8,0≦v<8, of a block 904 that has undergone DCT is given by:F(u,v)=¼{c(u) c(v)Σ_(i=0) ⁷Σ_(j=0) ⁷ f(i,j)cos U cos V}  (1)

for U=(2i+1)uπ/16

V=(2j+1)vπ/16

F(0, 0) represents a value corresponding to average data of the imageblock 902, and is called a DC coefficient in the sense of a directcurrent component. In case of equation (1), F(0, 0) is an 8-fold valueof the average value of intra-block data in practice. The remaining 63elements represent alternate current components, and are also called ACcoefficients. A component has a higher frequency with increasing value uor v in equation (1). Upon data compression, by exploiting thecharacteristics that AC components of a photo image have smaller valuesas increasing frequency, and high-frequency components are hard toperceive by the human eye, high-frequency components are quantized bycutting their lower bits, i.e., by a smaller number of bits.

IDCT for calculating f(i, j) from F(u, v) is given by:f(i,j)=¼{Σ_(u=0) ⁷Σ_(v=0) ⁷ F(u,v)c(u)c(v)cos U cos V}  (2)

for U=(2i+1)uπ/16

V=(2j+1)vπ/16

Note that the definitions of c(u) and c(v) in equation (2) are the sameas those in equation (1).

First Embodiment

FIG. 2 is a flow chart showing the process of image data which isencoded by DCT to have 8×8 pixels as one block. In the followingdescription, JPEG (Joint Photographic Experts Group) is used as an imageformat example of an encoded image, and YCbCr is used as a colorimetricsystem.

In step S102, an encoded image is analyzed. DC components of lightnessand color-difference signals in MCUs (Minimum Coded Units) are extractedwithout computing the IDCTs of all MCUs of an objective image. Theselightness and color-difference signals are accumulated and counted toacquire count values and average color differences for respectivelightness levels.

In step S103, transformation parameters of lightness andcolor-difference signals on a three-dimensional (3D) color space arecalculated on the basis of the count values and average colordifferences for respective lightness levels.

Finally, in step S104 the IDCTs of all the MCUs of the encoded image arecomputed to decode original image information. Based on thetransformation parameters of lightness and color-difference signals onthe 3D color space acquired in step S103, the transforms of lightnessand color-difference signals obtained by decoding the MCUs are computedon the 3D color space, thus obtaining an image with satisfactorylightness and color-difference signals.

The processes in steps S102 and S103 will be described in detail below.

[Accumulation/Count Process of Lightness and Color-Difference Signals]

FIG. 3 is a flow chart for explaining the accumulation/count process oflightness and color-difference signals in step S102. Note that acumulative buffer 200 shown in FIG. 3 is used to accumulate/countlightness and color-difference signals generated in the processing flow.Since lightness levels are 256 gray levels ranging from 0 to 255, thecumulative buffer 200 has lightness counters Y[256], Cb signalcumulative buffers Cb[256], and Cr signal cumulative buffers Cb[256] incorrespondence with respective lightness gray levels.

In step S202, the lightness counters, and Cb and Cr signal cumulativebuffers in the cumulative buffer 200 are reset to zero. In step S203, anMCU of an encoded image is checked to extract DC components of lightnessY and color differences Cb and Cr. Note that the MCU is a minimum unitof lightness and color-difference signals, and its configuration variesdepending on the coding resolutions of the lightness andcolor-difference signals.

In JPEG, since the resolution of a lightness signal is often differentfrom those of color difference signals, lightness and color-differencesignals are accumulated and counted in accordance with their codingstate in step S204, S206, or S208. It is checked in step S204 if theratio of signal quantities of a lightness signal and color differencesignals in the MCU is 4:1:1.4:1:1 indicates a case wherein one MCUconsists of 16×16 pixels, four blocks each including 8×8 pixels areassigned to lightness, and one block obtained by decimating 16×16 pixelsto 8×8 pixels is assigned to each of color differences Cb and Cr. Inaddition, such case is often described as 4:2:0 or the like.

If the signal quantity ratio is 4:1:1, since there are one each DCcomponents (Cb1 and Cr1) of the color difference signals compared to DCcomponents Y1, Y2, Y3, and Y4 of four lightness signals, four sets ofcolor signals Y1Cb1Cr1, Y2Cb1Cr1, Y3Cb1Cr1, and Y4Cb1Cr1 are accumulatedin the cumulative buffer 200 as color signals. FIG. 3 shows a statewherein color signals Y1Cb1Cr1 are accumulated in the cumulative buffer200. A buffer 201 corresponding to a signal value of lightness signal Y1is detected, values V=Y[Y1], W=Cb[Y1], and X=Cr[Y1] stored in the buffer201 are read out, and Y[Y1]=V+1, Cb[Y1]=W+Cb1, and Cr[Y1]=X+Cr[Y1] arewritten in the buffer 201, thus accumulating the color signals.Likewise, three sets of color signals Y2Cb1Cr1, Y3Cb1Cr1, and Y4Cb1Cr1are accumulated in the cumulative buffer 200, and the flow then jumps tostep S210.

If the signal quantity ratio is not 4:1:1, it is checked in step S206 ifthe signal quantity ratio is 4:2:2.4:2:2 indicates a case wherein oneMCU consists of 8×16 pixels, two blocks each consisting of 8×8 pixelsare assigned to lightness, and one block obtained by decimating 8×16pixels to 8×8 pixels is assigned to each of color differences Cb and Cr.In addition, such case is often described as 2:1:1 or the like.

If the signal quantity ratio is 4:2:2, since there are one each DCcomponents (Cb2 and Cr2) of the color difference signals compared to DCcomponents Y5 and Y6 of two lightness signals, two sets of color signalsY5Cb2Cr2 and Y6Cb2Cr2 are accumulated in the cumulative buffer 200 instep S207, and the flow jumps to step S210.

If the signal quantity ratio is not 4:2:2, it is checked in step S208 ifthe signal quantity ratio is 4:4:4.4:4:4 indicates a case wherein oneMCU consists of 8×8 pixels, and one block consisting of 8×8 pixels isassigned to each of lightness Y, and color differences Cb and Cr.

If the signal quantity ratio is 4:4:4, since there are one each DCcomponents (Cb3 and Cr3) of color difference signals compared to a DCcomponent Y7 of a lightness signal, one set of color signals Y7Cb3Cr3are accumulated in the cumulative buffer 200 in step S209, and the flowadvances to step S210.

It is checked in step S210 if extraction of DC components oflightness/color difference signals from all the MCUs is complete. Ifextraction is not complete, the flow returns to step S203. However, ifextraction is complete, the flow advances to step S211 to execute anormalization process of the cumulative buffer 200. In the normalizationprocess, the values of the color difference signals cumulative buffersCb[n] and Cr[n] are divided by the value Y[n] of the lightnessinformation counter for each lightness gray level value n, thuscalculating average color difference signals per MCU.

In the above description, the configuration of each MCU is limited tothree types, i.e., 4:1:1, 4:2:2, and 4:4:4. However, if the signalquantity ratio is other than these three types, a lightness andcolor-difference accumulation method suitable for that ratio is applied.In this embodiment, a description of such method will be omitted.

In the flow chart shown in FIG. 3, the process for determining theconfiguration of each MCU and the process for each configuration areexecuted every time DC components of each MCU are extracted. However,the position of such determination step is not particularly limited aslong as lightness and color-difference signals can be suitablyaccumulated in accordance with the configuration.

[Color Balance Correction]

The flow then advances to step S103 to calculate transformationparameters of lightness and color-difference signals on the 3D colorspace on the basis of the count values of lightness levels and averagecolor differences acquired in step S102.

A 3D image correction process of this embodiment includes color balancecorrection, contrast correction, and saturation correction. For thesecorrection processes, a method described in Japanese Patent Laid-OpenNo. 2000-13625 can be suitably applied. This method will be brieflydescribed below.

Highlight and shadow points are determined from an image. In this case,a cumulative frequency histogram of the lightness counters L[256] isgenerated. In this cumulative frequency histogram, an upper limit valueof a lightness signal corresponding to a predetermined cumulativefrequency Hth, which is set in advance, is determined as highlight pointHL, and a lower limit value of a lightness signal corresponding to acumulative frequency 5th is determined as shadow point SD. Then, averagecolor differences C1 _(HL)=Cb[HL] and C2 _(HL)=Cr[HL] at highlight pointHL, and average color differences C1 _(SD)=Cb[SD] and C2 _(SD)=Cr[SD] atshadow point SD are acquired.

In this manner, color differences C1 _(HL) and C2 _(HL) at highlightpoint HL and color differences C1 _(SD) and C2 _(SD) at shadow point SDare acquired. With these color differences, color solid axis I, i.e.,achromatic color axis I can be estimated, as shown in FIG. 4B. In anideal color solid of an image with good color balance, color solid axisI agrees with lightness axis Y, as shown in FIG. 4A.

Therefore, the color balance can be corrected by calculating a rotationmatrix and translation amount used to transform color solid axis I of aninput image to lightness axis Y, and correcting the input image usingthe rotation matrix and translation amount. Note that the rotationmatrix can be easily calculated as long as the axis of rotation and itsangle are determined. That is, the pixel values (C1, C2, Y) of an inputimage shown in FIG. 4B are transformed to (C1′, C2′, Y′) shown in FIG.4C on the 3D color space, thereby correcting the color balance of theinput image on the 3D color space.

[Adjustment of Contrast and Saturation]

Contrast and saturation are adjusted by simply checking if an inputimage suffers overexposure or underexposure, and gamma-correcting alightness signal accordingly.

Note that contrast adjustment adjusts lightness at shadow point SD to“0” or its neighbor (e.g., “10”) and lightness at highlight point SD to“255” or its neighbor (e.g., “245”) by gamma correction according to theexposure state of the input image.

A method of simply checking if an input image suffers overexposure orunderexposure and making gamma correction accordingly will beexemplified below.

Points which indicate a minimum distance between the color solid axis ofan image and the lightness axis, i.e., T and T′ in FIG. 4B, areobtained. These points can be easily obtained based on a geometricalrelationship. Then, contrast is adjusted so that T′ becomes equal to T.That is, using (T, T′) as an inflection point, lightness Y′ is correctedto Y″ using a function given by line a within a range Y′<T′, or using afunction given by line b within a range Y′>T′, as shown in FIG. 5. Whenthe color solid axis of an input image is parallel to the lightnessaxis, calculation itself of T is nonsense, and such specific case can becorrected using a function given by line 12.

Correction using T and T′ is particularly effective for an overexposedor underexposed image. Overexposure occurs since lightness of theoverall image is influenced by a bright region such as sky or the like.In this case, in an input device such as a digital camera or the like,color suppression at high lightness levels is made to cut saturation ofa high-lightness part. That is, if the color solid axis of an inputimage is examined on a two-dimensional (2D) plane specified bysaturation and lightness axes shown in FIGS. 6A and 6B, a part closestto an achromatic color appears in a high-lightness part in anoverexposed image, as shown in FIG. 6A. Contrary to this, in anunderexposed image, colors are suppressed at low lightness levels, asshown in FIG. 6B. Therefore, it can be simply checked based on T and T′values if an input image suffers overexposure or underexposure.

If the lightness axis of a color solid of an actual image is plotted onthe lightness-saturation plane, an overexposed image is expressed, asshown in, e.g., FIG. 7A, and an underexposed image is expressed, asshown in, e.g., FIG. 7B. Assuming that an overexposed or underexposedimage is obtained when an actual color solid has deviated from anoriginal (ideal) color solid due to some influences of image sensingconditions and input processes (e.g., A/D conversion and the like), thepositional relationship between T and T′ may have the smallestdeviation. Hence, lightness of the overall image is corrected to simplyobtain appropriate gray by restoring this deviation.

Saturation can be adjusted very easily. For example, if saturation is tobe raised 20%, a process given by:C 1″=1.2×C 1′C 2″=1.2×C 2′  (3)

can be made.

This is because saturation is defined by √(C1 ²+C2 ²). Note that thedegree of saturation adjustment may be determined automatically based onimage information or on the basis of a user's instruction.

The image correction process of this embodiment is done on the lightnessand color-difference space. Therefore, correction parameters used in theimage correction process are 3D lookup tables (3D LUT) generated basedon parameters that attain color balance correction, contrast correction,and saturation correction on the lightness and color-difference space.

As described above, according to the first embodiment, the lightness andcolor-difference distribution is inspected for low-frequency componentssuch as DC components in a DCT image in place of directly inspectingthat of an original image. For this reason, the data size to beinspected can be greatly reduced. More specifically, if the MCUconfiguration is 4:4:4 as in the process in step S209 shown in FIG. 3,the number of MCUs is 1/64 the number of original image data; if the MCUconfiguration is 4:1:1 as in the process in step S205, the number ofMCUs is 1/256 the number of original image data. Hence, by applying theprocess of the first embodiment, color fog, contrast, saturation, andthe like of a photo image can be quickly and satisfactorily corrected.

Second Embodiment

An image process according to the second embodiment of the presentinvention will be described below. Note that the same reference numeralsin the second embodiment denote substantially the same parts as those inthe first embodiment, and a detailed description thereof will beomitted.

The first embodiment has exemplified the image correction process thatextracts DC components of all MCUs, and extracts the count values ofrespective lightness levels and average color differences. However, ifonly DC components are used in a low-resolution image, an image having a4:1:1 MCU configuration, and the like, a pixel of a characteristiccolor, and surrounding pixels are averaged, and satisfactory color fog,contrast, and saturation correction parameters fail to be calculated.The second embodiment solves this problem, and implements quick andhighly reliable color fog, contrast, and saturation correctionprocesses.

In the second embodiment, the same processes as those in steps S102 toS104 shown in FIG. 2 of the first embodiment are executed. However, aprocess for acquiring the count value of each lightness level andaverage color differences in step S102 is different from the firstembodiment.

FIG. 8 is a flow chart showing details of the process in step S102 inthe second embodiment.

In step S302, DC components and a feature amount of AC components of anMCU are acquired. Note that the feature amount is not an actual ACcomponent itself, but is a value which indicates the degree ofuniformity of lightness and color-difference information in an MCU ofinterest. In JPEG, quantized high-frequency components are re-arrangedin a predetermined order after DCT, and components at later orderpositions (in general, higher-frequency component side) assume zero withhigh probability. After the last significant (nonzero) element of anMCU, a code named EOB (End of Block) is appended so as to reduce thecode data size, and coding of that MCU is finished with that element.

Hence, using the feature amounts and their checking conditions shown inTable 1 below, a tendency as to whether lightness and color-differencevariations for respective pixels in an MCU are large or smooth as awhole can be recognized. Note that if the checking result is true inTable 1, lightness and color-difference variations are large.

TABLE 1 Feature Amount Checking Condition Appearance position of EOBBehind predetermined position? Element at predetermined Predeterminedvalue (e.g., position/within zero)? predetermined range Sum total ofinformation Predetermined size or bit size up to less? predeterminedposition/within predetermined range of AC components in MCU Sum total ofquantized Predetermined value or values up to predetermined less?position/within predetermined range of AC components in MCU Maximumvalue of quantized Predetermined value or values up to predeterminedless? position/within predetermined range of AC components in MCU

In step S303, the checking conditions shown in table 1 are examined. Asa result, if it is determined that smoothness in the MCU is high, theflow advances to step S304, and DC components are accumulated as in thefirst embodiment. After that, the flow advances to step S307. On theother hand, if it is determined that smoothness in the MCU is low, theflow advances to step S305 to decode the MCU, and components of alldecoded pixels are accumulated in step S306. After that, the flowadvances to step S307.

It is checked in step S307 if all MCUs have been processed. If MCUs tobe processed still remain, the flow returns to step S302; otherwise, theprocess ends.

According to the second embodiment, since DC components before decodingan MCU or decoded signal values are accumulated, the count value of thelightness counter and accumulated values of the color differencecumulative buffers must be weighted in correspondence with the MCUconfiguration to attain uniform count processes in steps S304 and S306.

More specifically, if the MCU configuration is 4:1:1, the lightnesscounter counts 64 in correspondence with lightness levels Y1, Y2, Y3,and Y4 of DC components, and the corresponding color differencecumulative buffers can accumulate Cb1 and Cr1 respectively multiplied by64. Likewise, if the MCU configuration is 4:2:2, the counter can count32, and the buffers can accumulate corresponding values Cb and Crmultiplied with 32; if the MCU configuration is 4:4:4, the counter cancount 16, and the buffers can accumulate corresponding values Cb and Crmultiplied with 16. If the MCU configuration is other than these threetypes, a count value and multiplier suitable for that configuration canbe set.

In this manner, the count value of each lightness level and averagecolor differences can be accurately acquired using decoded informationfor an MCU with low smoothness, and using DC components for an MCU withhigh smoothness. Therefore, quick and highly reliable color fog,contrast, and saturation correction processes can be implemented.

Third Embodiment

An image process according to the third embodiment of the presentinvention will be described below. Note that the same reference numeralsin the third embodiment denote substantially the same parts as those inthe first embodiment, and a detailed description thereof will beomitted.

The second embodiment has exemplified the method of checking smoothnessof each MCU to implement quick and highly reliable color fog, contrast,and saturation correction processes. However, in the third embodiment, amethod of achieving both quickness and reliability more easily will beexplained.

FIG. 9 is a flow chart showing the process in the third embodiment.

It is checked in step S402 if the number of pixels of an image is equalto or larger than a predetermined threshold value. If the number ofpixels is equal to or larger than the threshold value, low-frequencycomponents are extracted and accumulated by the same method as in thefirst embodiment (S102). On the other hand, if the number of pixels issmaller than the threshold value, the flow advances to step S403 todecode all MCUs and to accumulate decoded signals.

The method of extracting DC components from MCUs may produce errorscompared to a case wherein MCUs are decoded. That is, in an originalimage with a smaller number of pixels, the weight of information of eachpixel is heavier than that in an original image with a larger number ofpixels. Hence, if such image is processed by extracting DC components ofMCUs, errors become relatively large, and adverse effects such asdeterioration of image quality may occur. Also, an original image with asmaller number of pixels can be processed within a short period of timeif all MCUs are decoded. Hence, in the third embodiment, an originalimage with a smaller number of pixels is processed by decoding MCUs, andan original image with a larger number of pixels is processed byextracting DC components from MCUs.

Note that an image with a VGA size (640×480 pixels) or less ispreferably processed by decoding MCUs in consideration of balance withadverse effects. Of course, a file size or the like may be used as acriterion in step S402 in place of the number of pixels.

In this way, the count values and average color differences areaccurately acquired from an image with a smaller number of pixels(smaller file size) using information obtained by decoding MCUs, andthose of an image with a larger number of pixels (larger file size) arequickly acquired using DC components of MCUs. Hence, quick and highlyreliable color fog, contrast, and saturation correction processes can beimplemented in correspondence with image formats and conditions.

Fourth Embodiment

An image process according to the fourth embodiment of the presentinvention will be described below. Note that the same reference numeralsin the fourth embodiment denote substantially the same parts as those inthe first embodiment, and a detailed description thereof will beomitted.

The fourth embodiment will explain a case wherein the numbers X and Y ofpixels of an image to be processed in the horizontal and verticaldirections are not integer multiples of the numbers x and y of pixelswhich form each MCU in the horizontal and vertical directions, and onlysome of pixels in an MCU at the edge of the image are effective pixelsand remaining ones are remainder pixels. Since remainder pixels arenormally discarded after decoding, a process for such remainder part isnot uniquely specified. In general, pixels at the edge are often copiedto the remainder part to improve the compression efficiency. In suchcase, if DC components are extracted, those which are stronglyinfluenced by the edge are extracted, and adverse effects occur in somecases. The fourth embodiment solves such problem, and quickly implementscolor fog, contrast, and saturation correction processes.

In the fourth embodiment, the same processes as those in steps S102 toS104 shown in FIG. 2 of the first embodiment are executed. However, aprocess for acquiring the count value of each lightness level andaverage color differences in step S102 is different from the firstembodiment.

FIG. 10 is a flow chart showing details of the process in step S102 inthe fourth embodiment.

It is checked in step S502 if the MCU to be processed is located at theedge of an image and contains remainder pixels. As a result, if the MCUneither is located at the edge nor contains remainder pixels, DCcomponents are extracted from the MCU and are accumulated in steps S503and S504 as in the first embodiment. After that, the flow advances tostep S507. On the other hand, if the MCU is located at the edge andcontains remainder pixels, that MCU is decoded in step S505, andeffective ones of the decoded pixels, except for the remainder pixels,are accumulated in step S506. After that, the flow advances to stepS507.

It is checked in step S507 if all MCUs have been processed. If MCUs tobe processed still remain, the flow returns to step S502; otherwise, theprocess ends.

In this way, suitable processes are applied to an MCU that containsremainder pixels, and that which does not contain any remainder pixelsto execute a quick and accurate accumulation process. Hence, quick andhighly reliable color fog, contrast, and saturation correction processescan be implemented in correspondence with the image size and MCU size.In other words, adverse effects owing to remainder pixels at the edge ofan image can be avoided while enjoying merits of a high-speed processattained by extracting DC components of MCUs.

Of course, in place of decoding MCUs, the same effects can be obtainedby the following method.

(1) Information of an MCU that contains remainder pixels is discardedwithout accumulation.

(2) Information of an MCU that contains remainder pixels is weighted andaccumulated.

Fifth Embodiment

An image process according to the fifth embodiment of the presentinvention will be described below. Note that the same reference numeralsin the fifth embodiment denote substantially the same parts as those inthe first embodiment, and a detailed description thereof will beomitted.

The processes that have been explained in the first to fourthembodiments are done based on lightness information extracted uponaccumulating lightness and color differences. When the aboveaccumulation process is implemented using DC components, if an MCUcontains pixels with an extremely different lightness level, saturationand contrast may be excessively emphasized due to the influence of suchpixels. Also, the positions of white and shadow points are averaged ifDC components are used, and the feature of original lightness andcolor-differences may be extracted as slightly weakened information. Thefifth embodiment this problem, and implements quick and highly reliablecolor fog, contrast, and saturation correction processes.

In the fifth embodiment, the same processes as those in steps S102 toS104 shown in FIG. 2 of the first embodiment are executed. However, aprocess for acquiring the count value of each lightness level andaverage color differences in step S102 is different from the firstembodiment.

FIG. 11 is a flow chart showing details of the process in step S102 inthe fifth embodiment.

In step S602, DC components and a feature amount of AC components in anMCU are extracted. This feature amount is an index that represents thesmoothness of lightness and color-differences in the MCU as in thesecond embodiment.

In step S603, a modulation width of lightness information and aweighting value of color difference information are calculated inaccordance with the extracted feature amount. In step S604, thelightness counter and cumulative buffer 200 undergo accumulation inaccordance with the modulation width and weighting value. That is, colordifference information weighted by the weighting value is accumulatedwithin a range obtained by modulating lightness by the modulation width.Details of this process will be explained later with reference to FIGS.12A to 12C.

It is checked in step S605 if all MCUs have been processed. If MCUs tobe processed still remain, the flow returns to step S602; otherwise, theprocess ends.

FIGS. 12A to 12C are views for explaining accumulation which is donewhile categorizing the feature amount into “high smoothness”, “lowsmoothness”,and “low smoothness & very large AC component”.

FIG. 12A shows a case of “high smoothness” in an MCU, FIG. 12B shows acase of “low smoothness” in an MCU, and FIG. 12C shows a case of “lowsmoothness & very large AC component” in an MCU. In any of these cases,color difference information, which is weighted by a weight indicated bythe broken curve is accumulated in the cumulative buffer 200corresponding to the lightness counter within the range of a modulationwidth X with respect to a DC extracted value Y1 of lightness of an MCU.

As shown in FIGS. 12A to 12C, the modulation width X is smaller withincreasing smoothness, and is broader with decreasing smoothness. Peakvalue A of a weight which forms a parabolic curve within the range ofthe modulation width X is larger with increasing smoothness, and issmaller with decreasing smoothness. However, if the AC component signalis very large, a weighting curve has negative characteristics. Note thatan area (indicated by hatching in FIGS. 12A to 12C) specified by theweighting curve and Y-axis (abscissa) within the range of the modulationwidth X is constant in all the cases.

In this way, since accumulation is done within the range correspondingto the smoothness of an MCU, a cumulative value that reflects thecharacteristics of each MCU can be obtained, and quick and highlyreliable color fog, contrast, and saturation correction processes can beimplemented.

In the above embodiment, MCUs are categorized into three classes inaccordance with the features of AC components, and lightness andcolor-differences are accumulated in accordance with the features.However, the gist of this embodiment lies in suitable accumulationaccording to the smoothness in an MCU, and the number of classes is notparticularly limited.

Sixth Embodiment

An image process according to the sixth embodiment of the presentinvention will be described below. Note that the same reference numeralsin the sixth embodiment denote substantially the same parts as those inthe first embodiment, and a detailed description thereof will beomitted.

FIG. 13 is a flow chart showing the process of the sixth embodiment.

In step S802, an encoded image is analyzed. The DC components oflightness and color-difference signals are extracted from MCUs withoutcomputing the IDCTs of all MCUs of an image to be processed. Byaccumulating/counting these lightness and color-difference signals, thecount values of respective lightness levels and average colordifferences are acquired, and highlight point HL and shadow point SD areobtained by the same method as in the first embodiment.

In step S803, transformation parameters of lightness andcolor-difference signals on the 3D color space are calculated on thebasis of highlight point HL and shadow point SD acquired in step S802 bythe same method as in the first embodiment.

In step S804, the DC components of lightness and color-differencesignals before decoding MCUs are corrected using the transformationparameters calculated in step S803, and the IDCTs of the corrected DCcomponents and AC components of lightness and color-difference signalsare then computed. In this way, the number of times of transformationusing 3D LUTs for color fog, contrast, and saturation correctionprocesses can be greatly reduced, and the correction process speech canbe improved.

Seventh Embodiment

In the seventh embodiment, an ink-jet printer with photo image quality,which comprises a direct print protocol (DPP), to which the presentinvention is applied, will be explained. Note that the same referencenumerals denote substantially the same parts as those in the first tosixth embodiments, and a detailed description thereof will be omitted.

[Outline]

FIG. 14 is a schematic perspective view of a printer 1000 of the seventhembodiment.

A printer 1000 has a normal printer function of printing image datareceived from a host computer, and a direct print function of printingimage data read from a storage medium such as a memory card or the likeor printing image data received from an image input device such as adigital camera or the like.

Referring to FIG. 14, a main body which forms an outer shell of theprinter 1000 comprises exterior members, i.e., a lower case 1001, uppercase 1002, access cover 1003, and exhaust tray 1004. The lower case 1001nearly forms the lower half portion of the main body, and the upper case1002 nearly forms the upper half portion of the main body. By combiningthese cases, a hollow structure which has a storage space that stores amechanism to be described later is formed. Openings are respectivelyformed on the upper and front surfaces of the main body.

One end portion of the exhaust tray 1004 is rotatably held by the lowercase 1001, and rotation of the tray 1004 opens/closes the opening formedon the front surface of the lower case 1001. For this reason, uponmaking the printer 1000 execute a print process, the exhaust tray 1004is rotated toward the front surface side to open the opening, so thatprint sheets can be exhausted from the opening. The exhausted printsheets are stacked on the exhaust trays 1004 in turn. The exhaust tray1004 stores two auxiliary trays 1004 a and 1004 b, and when theseauxiliary trays are pulled out as needed, the loading area of printsheets can be enlarged/reduced in three steps.

One end portion of the access cover 1003 is rotatably held by the uppercase 1002, and rotation of the cover 1003 opens/closes the openingformed on the upper surface of the main body. When the access cover 1003is opened, a printhead cartridge (not shown), ink tanks (not shown), orthe like housed in the main body can be exchanged. Although not shown,when the access cover 1003 is opened/closed, a projection formed on therear surface of the cover 1003 rotates a cover open/close lever. Bydetecting the rotation position of that lever using a microswitch or thelike, the open/close state of the access cover 1003 is detected.

A power key 1005 is arranged on the upper surface of the upper case1003. A control panel 1010 which comprises a liquid crystal display1006, various key switches, and the like is provided on the right sideof the upper case 1002. Details of the control panel 1010 will bedescribed later.

An automatic feeder 1007 automatically conveys a print sheet into themain body. A paper gap select lever 1008 is used to adjust the gapbetween the printhead and print sheet. A card slot 1009 can receive a PCcard complying with, e.g., the PCMCIA (Personal Computer Memory CardInternational Association) standard. An adapter which can receive amemory card or the like is inserted into the card slot 1009, and imagedata stored in the memory card can be loaded and printed via thisadapter. As the memory card, for example, a compact flash memory, smartmedia, memory stick, and the like may be used. Also, a PC card thatincorporates a hard disk may be used.

A viewer (liquid crystal display unit) 1011 is detachable from the mainbody, and is used when an image, index image, and the like are displayedfor respective frames (e.g., when the user searches images stored in thememory card for an image to be printed). A connector 1012 is connectedto a digital camera or the like (to be described later). A connector1013 is a USB bus connector used to connect a personal computer or thelike.

[Printhead]

FIG. 15 is a schematic perspective view showing an example of thestructure of the printhead of the printer 1000.

An printhead cartridge 1200 in this embodiment has a plurality of inktanks 1300 that store inks, and a printhead 1301 which ejects inkssupplied from the ink tanks 1300 from nozzles in accordance with printinformation, as shown in FIG. 15. The printhead 1301 is of so-calledcartridge type, which is detachably mounted on a carriage (not shown).Upon printing, the printhead cartridge 1200 is reciprocally scannedalong a carriage shaft, thus printing a color image on a print sheet. Inthe printhead cartridge 1301 shown in FIG. 15, independent ink tanks1300 for, e.g., black (K), light cyan (LC), light magenta (LM), cyan(C), magenta (M), and yellow (Y) are prepared to attain a photo-qualitycolor print process, and are detachable from the printhead 1301.

Note that an example that uses the aforementioned six color inks will bedescribed below. However, the present invention is not limited to suchspecific number of inks. For example, the present invention may beapplied to a printer which prints using four inks, i.e., black, cyan,magenta, and yellow. In this case, independent, four color ink tanks maybe detachable from the printhead 1301.

[Control Panel]

FIG. 16 is a schematic view of the control panel 1010.

Referring to FIG. 16, the liquid crystal display unit 1006 displays thefollowing menu items and the like used to set data associated with itemsprinted on the right and left sides of the unit 1006. These items can beselected or designated using cursor keys 2001.

Start/designate: first photo number or designated frame number used tospecify the range of image data (photos) to be printed

End: last photo number used to specify the range of image data (photos)to be printed

Copy count: the number of copies to be printed

Paper type: the type of print paper (print sheet) used in a printprocess

Layout: the setup of the number of images (photos) printed per printsheet

Quality: designate print quality

Date print: designate if a photographing date is printed

Image correction: designate if an image (photo) is printed aftercorrection

Print sheet count: displays the number of print sheets required for theprint process

Every time a mode key 2002 is pressed, the type of print (index print,all-frame print, one-frame print, and the like) is switched, and acorresponding LED 2003 is turned on in accordance with the selected typeof print. A maintenance key 2004 is used to do maintenance of theprinter 1000 (e.g., cleaning of the printhead 1301, and the like). Aprint start key 2005 is pressed when the start of a print process isinstructed or when the maintenance setup is settled. A print cancel key2006 is pressed when a print process or maintenance is canceled.

[Control Arrangement]

FIG. 17 is a block diagram showing the arrangement of principal partassociated with control of the printer 1000.

A DSP (digital signal processor) 3002 is DSP-C6211 available from TexasInstruments Incorporated, which includes a CPU and executes variouskinds of control to be described later, and image processes such asconversion from a luminance signal (RGB) into a density signal (CMYK),scaling, gamma conversion, error diffusion, and the like. A memory 3003has a program memory 3003 a which stores a control program to beexecuted by the CPU of the DSP 3002. The memory 3003 serves as a workarea of the DSP 3002, and stores programs and various data such as imagedata and the like. Note that the storage capacity of the memory 3003 isoften as small as several Mbytes due to cost limitations and the like ina normal photo-direct printer. Also, since the memory 3003 includes theprogram memory 3003 a and also an area required to storeinterface-related data, a storage capacity that can be actually used forthe purpose of image processes is further reduced.

A printer engine 3004 is that for an ink-jet printer which prints acolor image using a plurality of color inks. A digital camera 3012 isconnected to a USB bus connector 3005, and the viewer 1011 is connectedto a connector 3006. When the printer 1000 executes a print processbased on image data input from the PC 3010, a USB hub 3008 allows datareceived from a PC 3010 to pass through it, and supplies the data to theprinter engine 3004 via a USB bus 3021. In this way, the PC 3010connected to the printer 1000 can execute a print process by directlyexchanging data, signals, and the like with the printer engine 3004.That is, the printer 1000 serves as a normal printer. A power connector3009 inputs a DC voltage which is converted from commercial AC power bya power supply 3013.

Note that a communication is made between a controller 3000 and theprinter engine 3004 via the USB bus 3021 or an IEEE1284 interface 3022.

FIG. 18 is a block diagram showing the arrangement of an ASIC (dedicatedcustom LSI) 3001.

A PC card interface (I/F) 4001 is used to read image data stored in amemory card 3011 inserted into the card slot 1009, and to write data inthe memory card 3011. An IEEE1284 interface 4002 is used to communicatewith the printer engine 3004, when image data obtained from the digitalcamera 3012 or memory card 3011 is to be printed. A USB interface 4003is used to communicate with, e.g., the PC 3010 or the like. A USB hostinterface 4004 is used to communicate with, e.g., the digital camera3012 or the like. A control panel interface 4005 is used to receivevarious operation signals from the control panel 1010, and to outputdisplay data to the display unit 1006. A viewer interface 4006 is usedto output image data to the viewer 1011. An I/O 4007 is an interfacewhich is used to acquire status data of various switches, and to turnon/off LEDs 4009. A CPU interface 4008 is used to communicate with theDSP 3002. These interfaces are interconnected via an internal bus (ASICbus) 4010.

[Image Process]

FIG. 19 is a block diagram showing the functional arrangement associatedwith the interface and image process of the printer 1000.

A host 6000 corresponds to a host machine, i.e., a data source whenviewed from the printer 1000. The host 6000 includes the PC 3010 as ahost computer, digital camera 3012, and PC card 3011, which have beendescribed above, a game machine, television device, and the like (whichare not shown). The host 6000 and printer 1000 are connected via aninterface such as IEEE1284, IEEE1394, or the like, or may be connectedvia a wireless interface such as Bluetooth or the like.

The functions of the controller 3000 include a data input/storageprocess 6001 implemented by the ASIC 3001, a printer interface 6004 foroutputting print data to the printer engine 3004, and a multi-rendererprocess 6002 and image process/process control 6003, which areimplemented by the DSP 3002.

Image data read from the host 6000 is stored in the memory 3003 by thedata input/storage process 6001. Image data stored in the memory 3003 isconverted into data, which can be processed by the image process/processcontrol 6003, by the multi-renderer process 6002. The imageprocess/process control 6003 executes size conversion, a color process,and quantization, which are normally executed by a printer driver of ahost computer. This color process includes general color conversionprocesses such as gamut mapping as RGB-R′G′B′ conversion that correctsthe color space of an original image to that of a printer,luminance-density conversion for converting R′G′B into CMYK as coloragent components of a printer, a UCR & masking process, output gammacorrection, and the like, and also an image correction process forappropriately expressing the colors of an image sensed by the digitalcamera 3012, and the like.

The image data that has undergone the image process/process control 6003is sent to the printer engine 3004 via the printer I/F 6004. The printerengine 3004 executes various kinds of control such as motor control,data transfer to the printhead 1301, and the like by a known method(although its detailed description will be omitted), thus printing animage on a print sheet.

As has been described briefly, the printer 1000 is characterized byexecuting processes using the DSP. In general, a DSP excels in productsum operations. A high-function type DSP that incorporates manyarithmetic elements like the DSP 3002 of this embodiment is advantageousin parallel processes such as product sum operations and the like.Therefore, the DSP 3002 is suitable for arithmetic operations such ascolor processes, quantization, and the like, which may impose heavyloads on a normal processor in a direct print mode.

Furthermore, since use of the DSP 3002 is extremely suited to thepurpose for computing the frequency transforms such as DCTs, IDCTs, andthe like, and a software process can be flexibly changed and adjusted, aspecial decoding process described in the first to sixth embodiments (tobe referred to as a “high-speed JPEG decoding process” hereinafter),which is different from a general JPEG decoding process, can be easilyimplemented. If the high-speed JPEG decoding process is implemented by abatch process of a normal processor, DCT processes take considerabletime, and printer performance drops considerably upon executing a directprint process. If all functions are implemented by an ASIC, the circuitscale required to implement the high-speed JPEG decoding process becomeslarge and complicated. Of course, the circuit scale increases if ahigh-speed process is implemented without using any high-speed JPEGdecoding process.

Since the high-speed JPEG decoding process is implemented using the DSP,its effect can be remarkably improved.

Note that the first to seventh embodiments described above need not beindependently applied to an image processing apparatus such as a printeror the like, but may be applied to an image processing apparatus incombination, thus implementing a more preferable image process thatcombines the merits of the above embodiments.

Also, various arithmetic processes in color balance correction, contrastcorrection, saturation correction, and the like which have beenexplained in the first to sixth embodiments can be implemented bysupplying software to a CPU of a computer or by an electronic circuit(hardware) that combines multipliers and adders.

In the above embodiments, image data that has undergone orthogonaltransformation using 8×8 pixels as one block has been exemplified.However, arbitrary block sizes such as 4×4 pixels, 16×16 pixels, and thelike may be used, and a value other than the power of 2 such as 10×10pixels or the like may be used.

As described above, according to the above embodiments, an image processis done by inspecting the lightness and color-difference distributionfor low-frequency components in frequency data. That is, an image neednot be decoded for pre-inspection of the lightness and color-differencedistribution, and the data size to be inspected can be greatly reduced.Therefore, when an image compressed by, e.g., JPEG is to undergo colorfog, contrast, and saturation correction processes, the processing timeand load required to determine the 3D transform amount can be greatlyreduced.

Also, various problems which are expected upon executing the imageprocess based on low-frequency components can be solved using the numberof pixels, the feature amount of AC components, and the like, and quickand highly reliable color fog, contrast, and saturation correctionprocesses can be implemented.

As many apparently widely different embodiments of the present inventioncan be made without departing from the spirit and scope thereof, it isto be understood that the invention is not limited to the specificembodiments thereof except as defined in the appended claims.

1. An image processing apparatus comprising: an obtaining section,arranged to acquire lightness and color-difference information ofhalftone image data on the basis of low-frequency components offrequency data obtained by transforming the halftone image data intospatial frequency components; and a setter, arranged to set a lightnessand color-difference transform amount of the halftone image data on thebasis of the acquired lightness and color-difference information.
 2. Animage processing apparatus comprising: an extractor, arranged to extracta feature amount of frequency data obtained by transforming halftoneimage data into spatial frequency components; a determiner, arranged todetermine an acquisition method of lightness and color-differenceinformation of the halftone image data on the basis of the extractedfeature amount; an obtaining section, arranged to acquire lightness andcolor-difference information of the halftone image data from thefrequency data in accordance with the determination result; and asetter, arranged to set a lightness and color-difference transformamount of the halftone image data on the basis of the acquired lightnessand color-difference information.
 3. The apparatus according to claim 2,wherein said determiner determines whether the lightness andcolor-difference information is acquired from low-frequency componentsof the frequency data or from the frequency data.
 4. The apparatusaccording to claim 2, wherein said extractor extracts the feature amountfor each unit data of the frequency data.
 5. The apparatus according toclaim 4, wherein said determiner determines whether the lightness andcolor-difference information is acquired from low-frequency componentsof the frequency data or from the unit data.
 6. The apparatus accordingto claim 2, wherein the feature amount is at least one of an endposition of the unit data, a size of the unit data, a value of apredetermined element contained in the unit data, and an accumulatedvalue, maximum value, and minimum value of elements within apredetermined range contained in the unit data.
 7. The apparatusaccording to claim 2, wherein the feature amount is at least one ofsizes and the numbers of pixels of the tone data and the frequency data.8. An image processing apparatus comprising: a decider, arranged todecide whether or not unit data of frequency data obtained bytransforming halftone image data into spatial frequency componentscontains data which corresponds to remainder pixels; a determiner,arranged to determine based on the decision result whether or notlightness and color-difference information is acquired from the unitdata; an obtaining section, arranged to acquire lightnesscolor-difference information from low frequency components of the unitdata, acquisition of the lightness and color-difference information fromwhich is determined; and a setter, arranged to set a lightness andcolor-difference transform amount of the halftone image data on thebasis of the acquired lightness and color-difference information.
 9. Animage processing apparatus comprising: a decider, arranged to decidewhether or not unit data of frequency data obtained by transforminghalftone image data into spatial frequency components contains data,corresponds to remainder pixels; a determiner, arranged to determine anacquisition method of lightness and color-difference information on thebasis of the decision result; an obtaining section, arranged to acquirelightness and color-difference information from the unit data inaccordance with the determination result; and a setter, arranged to seta lightness and color-difference transform amount of the halftone imagedata on the basis of the acquired lightness and color-differenceinformation.
 10. The apparatus according to claim 9, wherein saiddeterminer determines whether the lightness and color-differenceinformation is acquired from low-frequency components of the unit dataor from the unit data.
 11. An image processing apparatus comprising: adecider, arranged to decide whether or not unit data of frequency dataobtained by transforming halftone image data into spatial frequencycomponents contains data, corresponds to remainder pixels; an obtainingsection, arranged to acquire lightness and color-difference informationfrom low-frequency components of the unit data, and weight the acquiredlightness and color-difference information on the basis of the decisionresult; and a setter, arranged to set a lightness and color-differencetransform amount of the halftone image data on the basis of the weightedlightness and color-difference information.
 12. An image processingapparatus comprising: an extractor, arranged to extract a feature amountof unit data of frequency data obtained by transforming halftone imagedata into spatial frequency components; a modulator, arranged tomodulate lightness and color-difference information of the halftoneimage data acquired from low-frequency components in the unit data onthe basis of the extracted feature amount; and a setter, arranged to seta lightness and color-difference transform amount of the halftone imagedata on the basis of the modulated lightness and color-differenceinformation.
 13. The apparatus according to claim 12, wherein saidmodulator distributes the acquired lightness and color-differenceinformation to a predetermined range by weighting the information by apredetermined weight.
 14. The apparatus according to claim 12, furthercomprising a converter arranged to perform lightness andcolor-difference transformation of low-frequency components of thefrequency data on the basis of the set lightness and color-differencetransform amount.
 15. An image processing method comprising the stepsof: acquiring lightness and color-difference information of halftoneimage data on the basis of low-frequency components of frequency dataobtained by transforming the halftone image data into spatial frequencycomponents; and setting a lightness and color-difference transformamount of the halftone image data on the basis of the acquired lightnessand color-difference information.
 16. An image processing methodcomprising the steps of: extracting a feature amount of frequency dataobtained by transforming halftone image data into spatial frequencycomponents; determining an acquisition method of lightness andcolor-difference information of the halftone image data on the basis ofthe extracted feature amount; acquiring lightness and color-differenceinformation of the halftone image data from the frequency data inaccordance with the determination result; and setting a lightness andcolor-difference transform amount of the halftone image data on thebasis of the acquired lightness and color-difference information.
 17. Animage processing method comprising the steps of: deciding whether or notunit data of frequency data obtained by transforming halftone image datainto spatial frequency components contains data which corresponds toremainder pixels; determining based on the decision result whether ornot lightness and color-difference information is acquired from the unitdata; acquiring lightness and color-difference information fromlow-frequency components of the unit data, acquisition of the lightnessand color-difference information from which is determined; and setting alightness and color-difference transform amount of the halftone imagedata on the basis of the acquired lightness and color-differenceinformation.
 18. An image processing method comprising the steps of:deciding whether or not unit data of frequency data obtained bytransforming halftone image data into spatial frequency componentscontains data which corresponds to remainder pixels; determining anacquisition method of lightness and color-difference information on thebasis of the decision result; acquiring lightness and color-differenceinformation from the unit data in accordance with the determinationresult; and setting a lightness and color-difference transform amount ofthe halftone image data on the basis of the acquired lightness andcolor-difference information.
 19. An image processing method comprisingthe steps of: deciding whether or not unit data of frequency dataobtained by transforming halftone image data into spatial frequencycomponents contains data corresponds to remainder pixels; acquiringlightness and color-difference information from low frequency componentsof the unit data, and weighting the acquired lightness andcolor-difference information on the basis of the decision result; andsetting a lightness and color-difference transform amount of thehalftone image data on the basis of the weighted lightness andcolor-difference information.
 20. An image processing method comprisingthe steps of: extracting a feature amount of unit data of frequency dataobtained by transforming halftone image data into spatial frequencycomponents; modulating lightness and color-difference information of thehalftone image data acquired from low-frequency components in the unitdata on the basis of the extracted feature amount; and setting alightness and color-difference transform amount of the halftone imagedata on the basis of the modulated lightness and color-differenceinformation.
 21. A computer program product, stored in acomputer-readable medium and having a computer program code, for animage processing method, the product comprising process procedure codesfor: extracting a feature amount of frequency data obtained bytransforming halftone image data into spatial frequency components;determining an acquisition method of lightness and color-differenceinformation of the halftone image data on the basis of the extractedfeature amount; acquiring lightness and color-difference information ofthe halftone image data from the frequency data in accordance with thedetermination result; and setting a lightness and color-differencetransform amount of the halftone image data on the basis of the acquiredlightness and color-difference information.
 22. A computer programproduct, stored in a computer-readable medium and having a computerprogram code, for an image processing method, the product comprisingprocess procedure codes for: deciding whether or not unit data offrequency data obtained by transforming halftone image data into spatialfrequency components contains data which is not contained in thehalftone image data; determining based on the decision result whether ornot lightness and color-difference information is acquired from the unitdata; acquiring lightness and color-difference information from lowfrequency components of the unit data, acquisition of the lightness andcolor-difference information from which is determined; and setting alightness and color-difference transform amount of the halftone imagedata on the basis of the acquired lightness and color-differenceinformation.
 23. A computer program product, stored in acomputer-readable and medium having a computer program code, for animage processing method, the product comprising process procedure codesfor: deciding whether or not unit data of frequency data obtained bytransforming halftone image data into spatial frequency componentscontains data which corresponds to remainder pixels; determining anacquisition method of lightness and color-difference information on thebasis of the decision result; acquiring lightness and color-differenceinformation from low the unit data in accordance with the determinationresult; and setting a lightness and color-difference transform amount ofthe halftone image data on the basis of the acquired lightness andcolor-difference information.
 24. A computer program product, stored ina computer-readable medium and having a computer program code, for animage processing method, the product comprising process procedure codesfor: deciding whether or not unit data of frequency data obtained bytransforming halftone image data into spatial frequency componentscontains data corresponds to remainder pixels; acquiring lightness andcolor-difference information from low frequency components of the unitdata, and weighting the acquired lightness and color-differenceinformation on the basis of the decision result; and setting a lightnessand color-difference transform amount of the halftone image data on thebasis of the weighted lightness/color difference information.
 25. Animage processing method comprising the steps of: extracting a featureamount of unit data of frequency data obtained by transforming halftoneimage data into spatial frequency components; modulating lightness andcolor-difference information of the halftone image data acquired fromlow-frequency components in the unit data on the basis of the extractedfeature amount; and setting a lightness and color-difference transformamount of the halftone image data on the basis of the modulatedlightness and color-difference information.
 26. An image processingapparatus for processing an image stored in an attached memory card oran image received from a digital camera, comprising: an obtainingsection, arranged to acquire lightness and color-difference informationof halftone image data on the basis of low-frequency components offrequency data obtained by transforming the halftone image data intospatial frequency components; and a setter, arranged to set a lightnessand color-difference transform amount of the halftone image data on thebasis of the acquired lightness and color-difference information.
 27. Animage processing method for processing an image stored in an attachedmemory card or an image received from a digital camera, comprising:acquiring lightness and color-difference information of halftone imagedata on the basis of low-frequency components of frequency data obtainedby transforming the halftone image data into spatial frequencycomponents; and setting a lightness and color-difference transformamount of the halftone image data on the basis of the acquired lightnessand color-difference information.